#version 430 core

uniform float transparency = 0.5f;
uniform bool reddish = false;

in vec2 textureCoor;

out vec4 fragcolor;

uniform sampler2D texture;

void main()
{
    //fragcolor = vec4(0.1f,0.3f,0.5f,1.0f);
    if(reddish)
    {
        vec4 tex = texture(texture, textureCoor);
        fragcolor = vec4((tex.r + 1.0f) / 2, tex.gba);
    }
    else
    {
        fragcolor = texture(texture, textureCoor) * vec4(1.0f, 1.0f, 1.0f, transparency);
    }
    
    //fragcolor = vec4(texture(texture, textureCoor).xyz, transparency);
}